This invention relates generally to the field of computer programming. More particularly, a system and method are provided for facilitating the use of temporary data storage within an XForms application.
There are many languages and interfaces designed to help one define, generate and/or present a web form or other document accessed and manipulated via a web browser. Some of the markup language options include HTML (HyperText Markup Language), XHTML (eXtensible HyperText Markup Language), WML (Wireless Markup Language) and HDML (Handheld Device Markup Language). However, these markup languages compel an author to merge the functional and presentation aspects of a form.
XForms, developed by the World Wide Web Consortium (W3C), is a specification for a forms markup language that uses a layered approach to allow the presentation of a form to be separated from its content. More particularly, XForms treats a web form as a composition of three layers: data, logic and presentation. The data layer identifies data fields in the form. The logic layer identifies constraints and dependencies on or between data fields. The presentation layer defines what the form looks like when it is output on a printer or computer screen. XForms documents can be viewed using a web browser or other application interface on virtually any type of computing device, including personal digital assistants and mobile telephones.
Because the XForms architecture is intended to provide a medium for a structured interchange of data, the collection or definition of an XForms document is important. Data used in a document are typically referred to as the document's “instance data,” and may be represented using an XML (eXtensible Markup Language) schema. Data are fed to an XForms processor, which applies the document's logic and presentation interface.
XForms instance data may be generated by a third party, and may reside internal or external to a particular XForms document or page. At runtime, an XForms document consumes specified instance data, and can modify the data and submit the modified data to an external consumer.
However, the XForms 1.0 specification allows XForms documents to manipulate the content, but not the structure, of instance data. For example, an XForms document can clone or modify XML elements and attributes included in the document's instance data. An XForms document author wishing to use temporary data storage (e.g., for application state management only within the context of the XForms application), would have to ensure that the storage was provided for in the document's instance data. But this may be difficult.
For example, if the instance data is provided by a third party, that third party may know nothing about the specific user interface and/or data management requirements of the document. Or, the third party may be unwilling to provide temporary data storage requested by one customer, if the data are provided to multiple customers. Yet further, an XML schema may constrain the data in a manner that would disallow the one customer's attributes.
In addition, temporary data storage that is included in the document's instance data and therefore serialized, would be exposed to any external consumer of the instance data. This may be undesirable in some cases.